package cn.tedu.florist.model;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class User {

    private Integer id;

    //message表示不符合当前格式要求时反馈给用户的错误信息
    @NotBlank(message = "手机号码不能为空")
    @Pattern(regexp = "^[1][3,4,5,7,8][0-9]{9}$",message = "请输入正确手机号")
    private String phone;

    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^\\w{6,12}$",message = "请输入正确密码")
    private String password;


}
